import request from "@/utils/request.js";
import functions from "@/utils/functions.js";


/**
 * 帖子列表
 * @param {Object} data
 */
export function articleList(data) {

	return request({
		url: '/zhonggu/user/index/articleList',
		method: "post",
		data
	});
}

/**
 * 帖子详情
 * @param {Object} data
 */
export function articleDetail(data) {

	return request({
		url: '/zhonggu/user/article/getArticleDetail',
		method: "post",
		data
	});
}

/**
 * 帖子评论
 * @param {Object} data
 */
export function commentsPages(data) {

	return request({
		url: '/zhonggu/user/comments/getCommentsPages',
		method: "post",
		data
	});
}

/**
 * 帖子点赞
 * @param {Object} data
 */
export function artSaveLike(data) {

	return request({
		url: '/zhonggu/user/article/saveLike',
		method: "post",
		data
	});
}

/**
 * 评论点赞
 * @param {Object} data
 */
export function commentsSaveLike(data) {

	return request({
		url: '/zhonggu/user/comments/saveLike',
		method: "post",
		data
	});
}

/**
 * 帖子收藏
 * @param {Object} data
 */
export function artSaveCollect(data) {

	return request({
		url: '/zhonggu/user/article/saveCollect',
		method: "post",
		data
	});
}


/**
 * 帖子评论
 * @param {Object} data
 */
export function commentsInsert(data) {

	return request({
		url: '/zhonggu/user/comments/insert',
		method: "post",
		data
	});
}

/**
 * 帖子评论删除
 * @param {Object} data
 */
export function commentsDelete(data) {

	return request({
		url: '/zhonggu/user/comments/delete',
		method: "post",
		data
	});
}

/**
 * 帖子举报
 * @param {Object} data
 */
export function saveReport(data) {

	return request({
		url: '/zhonggu/user/article/saveReport',
		method: "post",
		data
	});
}

/**
 * 帖子话题列表
 * @param {Object} data
 */
export function topicList(data) {

	return request({
		url: '/zhonggu/user/article/topicList',
		method: "post",
		data
	});
}


/**
 * 发帖
 * @param {Object} data
 */
export function insertTopic(data) {

	return request({
		url: '/zhonggu/user/article/insert',
		method: "post",
		data
	});
}

/**
 * 获取我发布的帖子 及 我点赞的帖子 我收藏的帖子
 * @param {Object} data
 */
export function articlePages(data) {

	return request({
		url: '/zhonggu/user/article/getArticlePages',
		method: "post",
		data
	});
}



